
#include <mockcpp/mockcpp.hpp>
#include <testngpp/testngpp.hpp>
#include "Volume.h"
#include "VolumeDisplayFormat.h"

USING_MOCKCPP_NS
USING_TESTNGPP_NS


FIXTURE(Volume)			
{

  
        TEST(should be able to express let 1 OZ length display 6 TSP)
        {
              TSPUnitDisplay dispFormat;
              Volume ounce(1, OZ, &dispFormat);
              stringstream ostr;
              ostr<<ounce;

              ASSERT_EQ( ostr.str(), "6 TSP");

        }

  
        TEST(should be able to express 1 TBSP equal to 3 TSP: 1 TBSP == 3 TSP is true)
        {
               Volume tablespoon(1, TBSP);
               Volume teaspoon(3, TSP);
    
               ASSERT_TRUE(tablespoon == teaspoon);
        }

         
        TEST(should be able to express 1 OZ equal to 2 TBSP: 1 OZ == 2 TBSP is true)
        {
               Volume ounce(1, OZ);
               Volume tablespoon(2, TBSP);

               ASSERT_TRUE(ounce == tablespoon);
        }

        TEST(should be able to express 12 TSP equal to 2 TBSP plus 1 OZ: 2 TBSP + 1 OZ == 12 TSP  is true)
        {
               Volume ounce(1, OZ);
               Volume tablespoon(2, TBSP);
               Volume teaspoon(12, TSP);

               ASSERT_TRUE(teaspoon == tablespoon + ounce);
               ASSERT_TRUE(tablespoon + ounce == teaspoon);
        }

        TEST(should be able to express 1 OZ equal to 1 TBSP plus 3 TSP: 1 TBSP + 3 TSP == 1 OZ is true)
        {
               Volume ounce(1, OZ);
               Volume tablespoon(1, TBSP);
               Volume teaspoon(3, TSP);

               ASSERT_TRUE(ounce == tablespoon + teaspoon);
               ASSERT_TRUE(tablespoon + teaspoon == ounce);
        }

         
 

 
};


